home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
bytesc88.arc
/
FREAD.C
< prev
next >
Wrap
Text File
|
1987-10-04
|
896b
|
28 lines
#define NOCCARGC /* no argument count passing */
#include clib.def
extern int Ustatus[];
/*
** Item-stream read from fd.
** Entry: buf = address of target buffer
** sz = size of items in bytes
** n = number of items to read
** fd = file descriptor
** Returns a count of the items actually read.
** Use feof() and ferror() to determine file status.
*/
fread(buf, sz, n, fd) char *buf; int sz, n, fd; {
return (read(fd, buf, n*sz)/sz);
}
/*
** Binary-stream read from fd.
** Entry: fd = file descriptor
** buf = address of target buffer
** n = number of bytes to read
** Returns a count of the bytes actually read.
** Use feof() and ferror() to determine file status.
*/
read(fd, buf, n) int fd, n; char *buf; {
return(Uread(buf,fd,n));
}